export enum VerifyType {
	'2fa' = '2fa',
	email = 'email',
	mobile = 'mobile'
}
export enum VerifyCodeType {
	email = 1,
	mobile = 2
}
export type GeetestCaptcha = {
	captchaOutput: string
	genTime: string
	lotNumber: string
	passToken: string
}
export type Login = {
	params: {
		username: string
		password: string
		internationalAreaCode: string | null
	} & GeetestCaptcha
	result: {
		accessToken: string | null
		email: string | null
		enable2fa: boolean
		expireIn: number
		internationalAreaCode: string | null
		mobile: string | null
		username: string | null
		verifyCodeType: VerifyCodeType
	}
}
export type LoginVerify = {
	params: {
		code: string
		username: string
		verifyCodeType: VerifyCodeType
	}
	result: {
		accessToken: string
	}
}
export type AuthVerify = {
	params: {
		username: string
		code: string
	}
	result: any
}
export type ThirdCallbackParams = {
	redirectUri: string
	socialCode: string
	socialState: string
	source: string
}
export type ThirdPartyInfo = {
	params: ThirdCallbackParams
	result: {
		authId: string
		email: string
		register: boolean
		source: string
	}
}

export type ThirdPartyRegister = {
	params: {
		authId: string | null
		email?: string | null
		inviteCode?: string | null
		source: string | null
		userId?: 0 | null
		username?: string | null
	}
	result: {
		accessToken: string
		email: string
		expireIn: number
	}
}

export type Enable2fa = {
	params: {
		code: string
		contactType?: string
		password: string
	}
	result: {
		email: string
		internationalAreaCode: string
		mobile: string
	}
}
